package command;

import java.util.ArrayList;
import java.util.List;

public class Context {

    private List<Command> commands = new ArrayList<>();

    public void add(Command command){
        commands.add(command);
    }

    public void process(){
        for (Command command : commands) {
            command.cook();
        }
        commands.clear();
    }


}
